Skip to content

feat(unstable): add metrics to otel#27143

Merged
devsnek merged 1 commit intomainfrom
metrics
Dec 2, 2024
Merged

feat(unstable): add metrics to otel#27143
devsnek merged 1 commit intomainfrom
metrics

Conversation

@devsnek
Copy link
Member

@devsnek devsnek commented Nov 29, 2024

Refs: #26852

Initial support for exporting metrics.

@devsnek devsnek requested a review from lucacasonato November 29, 2024 09:24
@devsnek devsnek requested review from bartlomieju and removed request for lucacasonato November 29, 2024 14:44
Comment on lines +789 to +795
let x = v8::ValueView::new(scope, string);
match x.data() {
v8::ValueViewData::OneByte(bytes) => {
String::from_utf8_lossy(bytes).into_owned()
}
v8::ValueViewData::TwoByte(bytes) => String::from_utf16_lossy(bytes),
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to do it instead of v8::String::to_rust_string_lossy()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spans.on_end(temporary_span.0);
}

pub struct TemporaryMetricsExport {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some docstrings here about the purpose of these structs and enums?

Co-Authored-By: Luca Casonato <hello@lcas.dev>
@devsnek devsnek merged commit 7c03677 into main Dec 2, 2024
@devsnek devsnek deleted the metrics branch December 2, 2024 19:45
bartlomieju pushed a commit that referenced this pull request Dec 5, 2024
Refs: #26852

Initial support for exporting metrics.

Co-authored-by: Luca Casonato <hello@lcas.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants